# Forked from Alpine Linux
pkgname=dino
pkgver=9999_git20210115
pkgrel=0
# feature/handy branch
_commit="eb146f811904405a17251fbb66920eaf0506a6a3"
pkgdesc="Modern Jabber/XMPP client"
url="https://dino.im"
arch="all"
license="GPL-3.0-only"
makedepends="
	glib-dev
	glib-networking
	gtk+3.0-dev
	gpgme-dev
	libgee-dev
	libsignal-protocol-c-dev
	libgcrypt-dev
	libhandy1-dev
	libsoup-dev
	sqlite-dev
	libqrencode-dev
	cmake
	vala
"
subpackages="$pkgname-lang"
source="
	https://github.com/dino/dino/archive/$_commit.tar.gz
	bump-signal-version.patch
	"
builddir="$srcdir/$pkgname-$_commit"
build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-tests
	make
}

check() {
	build/xmpp-vala-test
	build/signal-protocol-vala-test
}

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="a05c15199aae159ef03e05c4c2b97f81744f92cfaed718e2ea99043da76e68a557528e89abacf30519ae9a50e559fc0ed9f6794c5b0104b233a348695de82eea  eb146f811904405a17251fbb66920eaf0506a6a3.tar.gz
838ccba8d97db8bc43de26afd259e4bdaf3afea786bf40a7ed9ae63f4fb7c2190e8bf6de7b41880602113df87831d01467547f8bfd1f88b50d35287822cb5f4c  bump-signal-version.patch"
